import React from 'react'
import { Outlet, useNavigate } from 'react-router-dom'

export default function Home() {
  const navigate =   useNavigate()
const newsHandle = ()=>{
  navigate('/main/home/news')
}
const musicHandle = ()=>{
  navigate('/main/home/music?name=张三&age=18',{
    state:{a:1,b:2}
  })
}

  return (
    <div>
      <button onClick={newsHandle}>news</button>
      <button onClick={musicHandle}>music</button>
      <Outlet/>
    </div>
  )
}

